package pcb.control.commands 
{
	import com.intel.patterns.cairngorm.CairngormEvent;
	import com.intel.utils.Debugger;
	import pcb.control.delegates.Del_loadLesson;
	import pcb.control.events.LoadDataEvent;
	import pcb.control.responders.Re_loadPlayerConfig;
	
	/**
	 * ...
	 * @author Fintan Boyle
	 */
	public class Cmd_loadPlayerConfig extends AbstractCommand 
	{
		
		public function Cmd_loadPlayerConfig() 
		{
			
		}
		
		override public function execute(event:CairngormEvent):void 
		{
			Debugger.traceOut("Cmd_loadPlayerConfig > execute()");
			
			loadFile(event as LoadDataEvent);
		}
		
		private function loadFile(ev:LoadDataEvent):void
		{
			
			var del:Del_loadLesson = new Del_loadLesson(new Re_loadPlayerConfig(String(ev.data)));
			del.load("config.xml");
		}
		
	}
	
}